/* =====================================================
   GLOBAL STYLES
===================================================== */
body {
    font-family: "Calibri", "Segoe UI", Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #333;
}

h1, h2, h3, h4 {
    margin: 0;
}

.instruction {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1em;
}

/* =====================================================
   HEADER
===================================================== */
header {
    font-family: 'Exo', sans-serif;
    background-color: #000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-weight: 700;
    color: #777;
}

nav {
    display: flex;
    gap: 1rem;
}

nav a {
    color: #f1f904;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

.title-header {
    text-align: center;
    margin-top: 0.5rem;
}

.title-header h2 {
    color: #fff;
    font-size: clamp(1.8rem, 6vw, 3rem);
}

.subtitle {
    text-align: center;
    color: #fae901;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* =====================================================
   WORKSHEET / CONTENT
===================================================== */
.worksheet {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 80%;
    margin: 20px auto 40px;
}

.row {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.task {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    text-align: center;
    font-size: 1.2em;
}

.skeleton {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 2px dashed #fff;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    color: #777;
}

.skeleton img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

input[type="text"] {
    width: 90%;
    padding: 10px;
    font-size: 1em;
    border-radius: 6px;
    border: 2px solid #ccc;
    margin-bottom: 10px;
    transition: border-color 0.3s, background-color 0.3s;
}

.gleichung input.antwort {
    display: inline-block;      /* inline mit Text */
    width: auto;                /* passt sich Inhalt an */
    min-width: 80px;            /* Mindestbreite */
    padding: 4px 6px;
    font-size: 1em;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: all 0.3s;
    background-color: #fdeaea;  /* von vornherein rot/falsch */
    border-color: #e74c3c;     /* roter Rahmen */
}

.gleichung input.antwort.correct {
    background-color: #e6f7ea;  /* grün bei korrekt */
    border-color: #2ecc71;
}

.gleichung input.antwort.wrong {
    background-color: #fdeaea;  /* optional, bleibt rot */
    border-color: #e74c3c;
}



input.correct {
    background-color: #e6f7ea;
    border-color: #2ecc71;
}

input.wrong {
    background-color: #fdeaea;
    border-color: #e74c3c;
}

button {
    padding: 10px 16px;
    font-size: 1em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background-color: #3498db;
    color: #fff;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .row {
        flex-direction: column;
    }
}
